import App from './App';
import { createSSRApp } from 'vue';
import * as Pinia from 'pinia';
import piniaPersist from 'pinia-plugin-persist-uni';
import { setupPinia } from './sheep/store';
import uviewPlus from '@/uni_modules/uview-plus';
// import globalheader from '@/components/globalheader/globalheader';
export function createApp() {
  const app = createSSRApp(App);
  app.use(uviewPlus);

  const pinia = Pinia.createPinia();
  pinia.use(piniaPersist);
  // app.component('globalheader', globalheader);
  app.use(pinia);

  return {
    app,
    Pinia,
  };
}
